package leducHoldem.Calculator;

import java.util.HashMap;

import leducHoldem.misc.CFRInformationSet;

public abstract class TreeUpdater {
	
	protected ProbabilityCalculator probabilityCalculator;
	protected ValueCalculator valueCalculator;
	protected StrategyCalculator strategyCalculator;
	
	public TreeUpdater(ProbabilityCalculator probabilityCalculator, ValueCalculator valueCalculator, StrategyCalculator strategyCalculator) {
		this.probabilityCalculator = probabilityCalculator;
		this.valueCalculator = valueCalculator;
		this.strategyCalculator = strategyCalculator;
	}
	
	public abstract void updateTree(int iterationCount);
	
	public void setGameTree(HashMap<String, CFRInformationSet> gameTree) {
		probabilityCalculator.setGameTree(gameTree);
		valueCalculator.setGameTree(gameTree);
		strategyCalculator.setGameTree(gameTree);
	}

}
